import type { ListDataI, ListParams } from '@/types'
import type { EmployeeI } from '@/types/employee'
import { http } from '@/utils/reuqest'

/**
 * 查询用户列表
 */
export const employeeGetListApi = (params: ListParams) =>
  http.get<ListDataI<EmployeeI>>('park/sys/user', params)
/**
 * 删除用户
 */
export const employeeDelApi = (id: number) =>
  http.delete<null>(`park/sys/user/${id}`)
/**
 * 重置密码
 */
export const employeeResetPwdApi = (id: number) =>
  http.put<null>('park/sys/user/resetPwd', { id })
/**
 * 添加用户
 */
export const employeeAddApi = (data: EmployeeI) =>
  http.post('park/sys/user', data)
/**
 * 编辑用户
 */
export const employeeEditApi = (data: EmployeeI) =>
  http.put('park/sys/user', data)
